import "@babel/polyfill";
import React, { Component } from 'react';
import ReactDOM  from 'react-dom'
// const arr = [new Promise(() => {}), new Promise(() => {})];
// arr.map(item => console.log(item));
import RCHeader from './Header.js';

class App extends Component {
	constructor() {
		super();
		this.state = {
			message: 'gogo...',
			list: [0, 1, 2]
		}
	}

	componentDidMount() {
		console.log(this)
	}


	render() {
		let {message,list} = this.state;
		return (
			<div className="app-page">
				<RCHeader list={list}/>
				{message}
				{
					list.map((item, index) => {
						return (
							<div key={index}>{item}</div>
						)
					})
				}
			</div>
		)
	}
}

const root = document.querySelector('#root');
ReactDOM.render(<App/>, root)